[dotnet] [bidi] Align Scipt.LocalValue.Map with spec, enable negative zero#15395
[dotnet] [bidi] Align Scipt.LocalValue.Map with spec, enable negative zero#15395nvborisenko merged 30 commits intoSeleniumHQ:trunkfrom
Scipt.LocalValue.Map with spec, enable negative zero#15395Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
Scipt.LocalValue.Map with specScipt.LocalValue.Map with spec
|
Formatting build failure unrelated: --- a/py/test/selenium/webdriver/common/selenium_manager_tests.py
+++ b/py/test/selenium/webdriver/common/selenium_manager_tests.pyTest failures not related: //py:common-chrome-bidi-test/selenium/webdriver/common/bidi_tests.py
//py:common-edge-bidi-test/selenium/webdriver/common/bidi_tests.py
//rb/spec/integration/selenium/webdriver:action_builder-chrome-remote
//rb/spec/integration/selenium/webdriver:driver-chrome
//rb/spec/integration/selenium/webdriver:driver-chrome-remote
//rb/spec/integration/selenium/webdriver:driver-firefox-beta
//rb/spec/integration/selenium/webdriver:manager-chrome
//rb/spec/integration/selenium/webdriver:select-chrome
//rb/spec/integration/selenium/webdriver:select-chrome-remote |
nvborisenko
left a comment
There was a problem hiding this comment.
Good test coverage, thanks!
User description
Fixes using the

Script.LocalValue.Maptype and the related return type. The spec describes it the same asObject:So this is now a "clone" of

LocalValue.Object.Additionally, this PR deserializes negative zero from a string, in alignment with the spec:
Motivation and Context
Fixes #15394
Types of changes
Checklist
PR Type
Bug fix, Tests
Description
Fixed
Script.LocalValue.Mapto align with the WebDriver BiDi spec.Updated
RemoteValue.Mapto useIReadOnlyList<IReadOnlyList<RemoteValue>>.Added comprehensive tests for
LocalValueandRemoteValueroundtrip scenarios.Enhanced JSON serialization options to handle named floating-point literals.
Changes walkthrough 📝
Broker.cs
Enhanced JSON serialization options.dotnet/src/webdriver/BiDi/Communication/Broker.cs
LocalValue.cs
Updated `LocalValue.Map` structure.dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
Mapto useIEnumerable>.Objectserialization structure.RemoteValue.cs
Modified `RemoteValue.Map` structure.dotnet/src/webdriver/BiDi/Modules/Script/RemoteValue.cs
Mapto useIReadOnlyList>.CallFunctionParameterTest.cs
Added comprehensive tests for `LocalValue` and `RemoteValue`.dotnet/test/common/BiDi/Script/CallFunctionParameterTest.cs
LocalValueandRemoteValueroundtripscenarios.
LocalValuetypes.
MapandObjectstructures for compliance with the spec.